package org.dfrt.own.service;

import org.dfrt.own.entity.User;

import javax.servlet.http.HttpSession;
import java.util.Map;

/**
 * @author zhang
 * ClassName: UserService
 * Description: 用户管理业务逻辑层
 * date: 2023/10/3 20:18
 * @since JDK 8
 */
public interface UserService {

    /**
     * 用户登录
     * @param uname
     * @param upasswd
     * @return
     */
    public User selectUserToLogin(String uname, String upasswd);

    /**
     * 用户注册
     * @param uname
     * @param passwd
     * @param repasswd
     * @return
     */
    public Map<String, String> registerUser(String uname, String passwd, String repasswd);

    /**
     * 修改用户信息
     * @param uid
     * @param uname
     * @param ubirthday
     * @param udesc
     * @param upasswd
     * @return
     */
    public Map<String, String> updateUser(HttpSession session ,Integer uid, String uname, String ubirthday, String udesc, String upasswd);

    /**
     * 注销用户
     * @param user
     * @return
     */
    public Map<String, String> deletUserByUser(User user);
}
